import getApiData from '@/services/cpasRequest';

export async function getAccountInfo(params: { dbname: string }) {
  if (!params.dbname) return [];
  const res = await getApiData('account.accountInfo.getDataList', params);
  if (res.ok) {
    return Promise.resolve({
      data: res.data,
      success: true,
    });
  }
  return Promise.resolve({
    data: [],
    success: false,
  });
}
